'use strict'

let http = require('http');
// let url = require('url');
let querystring = require('querystring')
let port = 6444;
http.createServer((req,res)=>{
    let result = [];
    // console.log(req.url);
    req.on('data',(buffer)=>{
        result.push(buffer)
    })
    req.on('end',()=>{
        let data = Buffer.concat(result).toString();
        console.log(querystring.parse(data));
    })
    // console.log(url.parse(req.url,true));
}).listen(port)

console.log(`Server is running at Http://localhost:${port}`);